package com.service;

import com.entity.User;
import com.github.pagehelper.PageInfo;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface UserService {
    boolean login(String email,String pwd);
    boolean activeUser(String email,String code);
    boolean register(String email, String password, String salt, String nickname, Integer status, String code, Date create_date);
    void insertUser(User user);
    void deleteUserById(Integer id);
    void updateUser(User user);
    User selectUserById(Integer id);
    User selectUserByEmail(String email);
    PageInfo<User> searchUsers(@Param("pageNum")Integer pageNum,
                               @Param("pageSize")Integer pageSize,
                               @Param("value") String value);
    PageInfo<User> selectPageUsers(@Param("pageNum")Integer pageNum,
                                @Param("pageSize")Integer pageSize,
                                  @Param("query") String query,
                                  @Param("value") String value);
}
